import React from 'react';
import {Upload, Icon} from 'antd';
import ppHOC from './PP';

// @ppHOC
export default class CUpload extends React.PureComponent {
  render () {
    // debugger;
    const {fileList, ...restProps} = this.props;
    return (
      <Upload fileList={fileList} {...restProps}>
        {fileList && fileList.length >= 1
          ? null
          : <div>
            <Icon type="plus"/>
            <div className="ant-upload-text">Upload</div>
          </div>
        }
      </Upload>
    );
  }
}
